<?php

class Zend_Controller_Action_Helper_GetLoggedUser extends Zend_Controller_Action_Helper_Abstract
{
    function direct()
    {
        $auth = Zend_Auth::getInstance();
        if ($auth->hasIdentity()) {
      		$user = $auth->getIdentity();
        }
      	return $user->id;
    }
}
?>